<template>
  <div class="app-container">
    <el-tabs type="border-card" :value="activeTab" @tab-click="changeTab">
      <el-tab-pane name="one" label="层级配置总览">
        <level v-show="activeTab==='one'"></level>
      </el-tab-pane>
      <el-tab-pane label="商户配置总览" name="two">
        <merchant v-show="activeTab==='two'"></merchant>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>


<script>
  import Level from "@/views/finance/paymentConfigOverview/level";
  import Merchant from "@/views/finance/paymentConfigOverview/merchant";
  import {tabs} from '@/build'

  export default {
    name: "recharge-payment",
    components: {
      Level,
      Merchant
    },
    mixins: [tabs],
    data() {
      return {
        activeTab: 'one'
      }
    },
    mounted() {
      this.$store.dispatch(types.SAVE_OPERATION_LOG, {content: _.getContent(this.$route, '层级配置总览', true)});
    },
    methods: {
      changeTab(tabs) {
        this.activeTab = tabs.name
        // if (tabs.name == 'one') this.$store.dispatch(types.SAVE_OPERATION_LOG, {content: _.getContent(this.$route, tabs.label, true)});
        this.$store.dispatch(types.SAVE_OPERATION_LOG, {content: _.getContent(this.$route, tabs.label, true)});
      }
    }
  }
</script>

<style lang="scss" scoped>

</style>
